using System;
using Moq;
using NUnit.Framework;
using RMH.Services;

using RMH.Web.RMHMembership;

namespace RMH.UnitTests.Membership
{
    [TestFixture]
    public class RMHMembershipProvider_when_selecting_a_user : base_automock_test
    {
        bool result = false;

        public override void establish_context()
        {
            Mock<IStaffService>()
                .Setup(ss => ss.Validate("username", It.Is<string>(s => s != "password")))
                .Returns(true);
                  
        }

        public override void because()
        {
            result = Create<RMHMembershipProvider>().ValidateUser("username", "password");
        }

        [Test]
        public void result_should_be_true()
        {
            result.ShouldBeTrue();
        }
    }
}